package com.ztao.controller;

import com.heima.model.common.admin.dto.AuthDto;
import com.heima.model.common.admin.pojos.ApUserRealname;
import com.heima.model.common.dtos.ResponseResult;
import com.ztao.service.UserService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/api/v1/auth")
public class ApUserRealnameController {
    @Resource
    private UserService userService;
    @PostMapping("/list")
    public ResponseResult list(@RequestBody AuthDto dto){
        return  this.userService.findAll_realname(dto);
    }
    @PostMapping("/authFail")
    public ResponseResult authFail(@RequestBody AuthDto dto){
        return this.userService.authFail(dto);
    }

    @PostMapping("/authPass")
    public ResponseResult authPass(@RequestBody AuthDto dto){
        return this.userService.authSuccess(dto);
    }


}
